import request from '@/utils/request'

export function payoff(channelId, channelCode, query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_MALL_API}/api/mall/payment/payoff/${channelId}/${channelCode}`,
    method: 'post',
    contentType: 'json',
    data: query
  })
}

export function refund(channelId, channelCode, query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_MALL_API}/api/mall/payment/refund/${channelId}/${channelCode}`,
    method: 'post',
    contentType: 'json',
    data: query
  })
}

export function paymentInfoTable(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_MALL_API}/api/mall/payment/info/table`,
    method: 'post',
    data: query
  })
}

export function paymentInfoDelete(id) {
  return request({
    url: `${process.env.VUE_APP_MODULE_MALL_API}/api/mall/payment/info/delete/${id}`,
    method: 'post'
  })
}

export function refundInfoTable(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_MALL_API}/api/mall/refund/info/table`,
    method: 'post',
    data: query
  })
}

export function refundInfoDelete(id) {
  return request({
    url: `${process.env.VUE_APP_MODULE_MALL_API}/api/mall/refund/info/delete/${id}`,
    method: 'post'
  })
}
